package com.sc.auction.goods.feign;


import com.sc.auction.common.util.R;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@Service
@FeignClient(name = "auction-oss")
public interface GoodsOssService {

    @PostMapping(value = "/oss/file/upload",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public R upload(@ApiParam(value = "文件",required = true) @RequestPart(value = "file") MultipartFile file,
                    @ApiParam(value = "模块",required = true) @RequestParam(value = "module") String module);
}
